home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 11 / PCPP11.iso / utils / frogbit / fb-097.exe / CHOP AND TOTAL AND ROUTE.FB next >
Encoding:
Text File  |  1997-02-04  |  674 b   |  29 lines

  1.  
  2. // remove sections looking like this :-
  3.  
  4. //  Summary ...
  5. //  ...
  6. //  Total ...
  7.  
  8. // - but also extract info from Total lines
  9. // - and route output to different files
  10.  
  11. input "report.txt"
  12.  
  13. do
  14.   copy lines until (line beginsWith "Summary")
  15.   skip lines until (line beginsWith "Total")
  16.   leave if (not found)
  17.   if (line matches "Total for ~(town), ~(month) ~(year): ~(total)")
  18.     write ("--> " town ": " total " (" month " " year ")")
  19.     output (town " " month " " year ".txt")
  20.     set output equal to ""
  21.   else
  22.     write ("*** unrecognised total line: " line)
  23.   endif
  24.  
  25.   // comment out the next line to make the program run faster
  26.   refresh
  27.  
  28. loop
  29.